package withdraw

import "gitee.com/liuxuezhan/ar-platform/assets-rpc/internal/dao/schema"

const TableNameWithdrawOrder = "withdraw_order"

// WithdrawOrder 提现订单
type WithdrawOrder struct {
	schema.Model
	UserId                int64   `gorm:"type:bigint;not null;comment:用户id;index"`
	ChannelType           int32   `gorm:"type:tinyint;not null;comment:渠道类型,1Bank,2Ewallet,3LocalEwallet,4PixWallets,5UsdtWallets;index"`
	OrderNo               string  `gorm:"type:varchar(64);not null;comment:商户订单号;index"`
	OrderId               string  `gorm:"type:varchar(64);not null;comment:第三方支付平台订单号;index"`
	NotifyUrl             string  `gorm:"type:varchar(1024);not null;comment:异步通知地址"`
	OrderAmount           float64 `gorm:"type:decimal(20,4);not null;comment:订单金额"`
	Fee                   float64 `gorm:"type:decimal(20,4);not null;comment:手续费"`
	Real                  float64 `gorm:"type:decimal(20,4);not null;comment:实际金额"`
	Ratio                 float64 `gorm:"type:decimal(20,4);not null;comment:换算比率"`
	RealAmount            float64 `gorm:"type:decimal(20,4);not null;comment:实际币种数量"`
	DailyTimes            int32   `gorm:"type:int;not null;comment:日总提现次数"`
	Status                int32   `gorm:"type:tinyint;not null;comment:1待审核,2已锁定,3已提交,4未通过，5已通过 6支付失败==异常消除;index"`
	Locker                string  `gorm:"type:varchar(32);not null;comment:锁定人;index"`
	WithdrawUserChannelId int64   `gorm:"type:bigint;not null;comment:用户账户信息id"`
	WithdrawChannelId     int64   `gorm:"type:bigint;not null;comment:代付通道id"`
	UserRemark            string  `gorm:"type:varchar(32);not null;comment:用户备注"`
	LockerRemark          string  `gorm:"type:varchar(255);not null;comment:错误备注"`
	ReturnJson            string  `gorm:"type:varchar(2048);not null;comment:第三方回调信息"`
	Domain                string  `gorm:"type:varchar(255);not null;comment:C端渠道域名"`
}

func (*WithdrawOrder) TableName() string {
	return TableNameWithdrawOrder
}
